import request from '@/utils/request'

// 查询螺丝列表
export function listScrew(query) {
  return request({
    url: '/hualian/screw/list',
    method: 'get',
    params: query
  })
}

// 查询螺丝详细
export function getScrew(screwId) {
  return request({
    url: '/hualian/screw/' + screwId,
    method: 'get'
  })
}

// 新增螺丝
export function addScrew(data) {
  return request({
    url: '/hualian/screw',
    method: 'post',
    data: data
  })
}

// 修改螺丝
export function updateScrew(data) {
  return request({
    url: '/hualian/screw',
    method: 'put',
    data: data
  })
}

// 删除螺丝
export function delScrew(screwId) {
  return request({
    url: '/hualian/screw/' + screwId,
    method: 'delete'
  })
}
